package com.banmao.mall.mapper;

import com.banmao.mall.model.bo.admin.user.HistoryListBO;
import com.banmao.mall.model.pojo.SearchHistory;
import com.banmao.mall.model.vo.admin.user.HistoryVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SearchHistoryMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(SearchHistory record);

    int insertSelective(SearchHistory record);

    SearchHistory selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(SearchHistory record);

    int updateByPrimaryKey(SearchHistory record);

    //ps
    int updateDeleted(SearchHistory record);

    List<HistoryVO> selectHistoryByCondition(HistoryListBO historyListBO);

    //ps
    List<SearchHistory> selectByNeed(SearchHistory record);


    int insertHistory(@Param("userId") Integer userId, @Param("keyword") String keyword);

    int selectCountWithKeyword(@Param("userId") Integer userId, @Param("keyword") String keyword);

    int updateUpdateTime(@Param("userId") Integer userId, @Param("keyword") String keyword);
}